<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="css/common.css" type="text/css" />
<script language="javascript" src="js/jquery-1.4.2.min.js"></script>
<script language="javascript" src="js/jquery.checkboxes.min.js"></script>
<script language="javascript" src="js/tableRowCheckboxToggle.js"></script>
<script>
$(document).ready(function(){
		//点击事件切换 全选取消状态
		$("#selectall").click( function (){ $("#grouplist").toggleCheckboxes(); });
	});
</script>
<title>商家列表</title>
</head>

<body>
<div id="man_zone">

<table width="99%" border="0" align="center" cellpadding="0" cellspacing="1">
  <tr>
    <td><input type="button" onclick="grouplist.submit();" name="Submit" value="删除选定" />
        <input type="button" onclick="location.href='suppliers_add.php'" name="Submit2" value="添加供应商" /></td>
    <td width="62%" align="right">
	<form id="seach" name="seach" method="get" action="">
	商家名称：
      <input name="name" type="text" id="name" size="15" />
      &nbsp;
      <input type="submit" name="Submit3" value="搜索" />   
	  
	  </form>
	  </td>
  </tr>
</table>
<form method="post" action="?action=dels" name="grouplist" id="grouplist">
<table width="99%" align="center"  border="0" cellpadding="3" cellspacing="1" class="table_style">
    <tr>
      <th width="2%"><label>
        <input type="checkbox" name="checkbox" value="checkbox" id="selectall" />
      </label></th>
      <th width="4%">编号</th>
      <th width="17%">商家名称</th>
      <th width="20%">商家地址</th>
      <th width="20%">商家电话</th>
      <th width="11%">条形码类型</th>
      <th width="20%">营业时间</th>
      <th width="6%">操作</th>
    </tr>
	<?php if(is_array($dataarray)){foreach($dataarray as $value){?>
    <tr class="odd_row">
      <td align="center"><input type="checkbox" name="delids[]" value="<?php echo $value['sid']?>" /></td>
      <td><?php echo $value['sid']?></td>
      <td><?php echo $value['name']?>&nbsp;</td>
      <td><?php echo $value['address']?></td>
      <td><?php echo $value['tel']?>&nbsp;&nbsp;</td>
      <td><?php echo $value['codebar']?>&nbsp;</td>
      <td><?php echo $value['operating_time']?></td>
      <td><a href="suppliers_list.php?action=edit&amp;sid=<?php echo $value['sid']?>">编辑</a>|<a href="javascript:if(confirm('确实要删除吗?'))location='suppliers_list.php?action=del&sid=<?php echo $value['sid']?>'">删除</a></td>
    </tr>
	<?php }}else{?>
	<tr><td colspan=8>暂无数据..............</td></tr>
	<?php };?>
  </table>
  
  </form>
  <div style="width:99%;margin:0px auto;">
  <?php echo multi($total,$pagesize,$page,"");?>
  </div>
</div>
</body>
</html>
